{% extends "header.html" %}

{% block content %}
<hr width="100%" size=1 />
<div class="recommend">
    <ul>
        <li>所有宝贝 | </li>
        <li><a href="#">数码</a></li>
        <li><a href="#">服饰</a></li>
        <li><a href="#">家居电器</a></li>
        <li><a href="#">日用百货</a></li>
        <li><a href="#">文化玩乐</a></li>
    </ul>
</div>

<div id="list-filter">
    <form class="form-search" action="/search" method="GET">
        <div class="fhead">搜索选项 |</div>
        <div class="item"> 
           <label>标签:</label>
           <input type="text" class="span2" name="tags">
        </div>
        <div class="item"> 
           <label>价位:</label>
           <input type="text" class="input-small" name="price">
           <label>至</label>
           <input type="text" class="input-small" name="price">
        </div>
        <div class="searchbar2 input-append">
               <input type="text" class="span2 search-query" name="name">
               <button type="submit" class="btn">搜索</button>
        </div>
   </form>
</div>


<div id="list-items">
    <ul class="clearfix">
        {% for item in items %}
        <li class="list-item">
        <div class="item-main"> 
            <div class="pic">
                <a href="/item/detail?pid={{item.pid}}"><img src="/item/img?pid={{item.pid}}"></img></a> 
            </div>
            <ul class="item-attr">
                <li class="name">{{item.name}} </li> 
                <li class="tags">{% if not item.tags %}无标签{% else %}{{item.tags}}  {% endif %}</li> 
            </ul>
            <span class="price">{{item.price}}</span>
        </div>
        </li>
        {% endfor %}
    </ul>
</div>
<div id="pager" class="pagination-centered">
    <ul class="pager">
        <li><a href="/?pno={{first}}">首页</a></li>
        <li><a href="/?pno={{prev}}">上一页</a></li>
        <li><a href="/?pno={{next}}">下一页</a></li>
          <li><a href="/?pno={{last}}">末页</a></li>
          <li>找到{{count}}条记录,当前第{{cur}}页, 共{{last}}页</li>
    </ul>
</div>
{% endblock %}
